# -*- coding: utf-8 -*_
from __future__ import unicode_literals
from django.db import models
from django.utils import timezone
from django.contrib.auth.models import User
from django import forms
from taggit.managers import TaggableManager
from ckeditor_uploader.fields import RichTextUploadingField



# Create your models here.

class Post(models.Model):
	title = models.CharField(max_length=250)
	body = models.TextField(default="""<img src="/static/mvnv.jpg" style="width: 300px;height: 300px">""")
	publish = models.DateTimeField(default=timezone.now)
	created = models.DateTimeField(auto_now_add=True)
	updated = models.DateTimeField(auto_now=True)
	tags = TaggableManager()
	uploads = RichTextUploadingField()

	class Meta:
		ordering = ('-publish',)
		verbose_name = "Blog"
		verbose_name_plural = verbose_name


class SearchFrom(forms.Form):
	search = forms.CharField(required=True, label="",
	                         widget=forms.TextInput(attrs={'type': 'search'}))
